<?php

namespace common\entities\myhtsq;

use Yii;

/**
 * This is the model class for table "myscrm_application_price".
 *
 * @property string $price_id
 * @property string $application_id
 * @property string $price
 * @property string $unit
 * @property string $created_on
 * @property string $created_by
 * @property string $modified_on
 * @property string $modified_by
 */
class ApplicationPriceEntity extends \common\entities\ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_application_price';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['price_id'], 'required'],
            [['price'], 'number'],
            [['created_on', 'modified_on'], 'safe'],
            [['price_id', 'application_id', 'created_by', 'modified_by'], 'string', 'max' => 36],
            [['unit'], 'string', 'max' => 30]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'price_id' => '价格ID',
            'application_id' => '产品ID',
            'min_price' => '最小数量单价',
            'min_number' => '最小数量',
            'price' => '标准单价',
            'unit' => '单位',
            'created_on' => '创建时间',
            'created_by' => '创建人',
            'modified_on' => '修改时间',
            'modified_by' => '修改人',
        ];
    }
}
